<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>AI人脸登录</title>
  <link rel="stylesheet" href="/layui/css/layui.css">
  <style>
    body {
      font-family: Arial, sans-serif;
      background: #f0f2f5;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      margin: 0;
    }
    .container {
      text-align: center;
      background: #ffffff;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
      padding: 20px;
      border-radius: 10px;
    }
    #video, #canvas {
      border: 2px solid #d2d2d2;
      border-radius: 10px;
    }
    #flag {
      margin-bottom: 20px;
      font-size: 18px;
      color: #333;
    }
    .getface {
      position: relative;
    }
    .getface video, .getface canvas {
      display: block;
      margin: 0 auto;
    }
  </style>
</head>
<body>
<div class="container">
  <p id="flag">请稍候...</p>
  <div class="getface">
    <video id="video" width="400px" height="400px" autoplay="autoplay"></video>
    <canvas id="canvas" width="400px" height="400px" style="display: none;"></canvas>
  </div>
</div>
<script src="/jquery/jquery-3.6.0.js"></script>
<script src="/util/aiface.js"></script>
<script src="/util/request.js"></script>
<script src="/layui/layui.js"></script>
<script>
  $(function () {
    openMedia();
    setTimeout("step01()", 1000);                          // 开启摄像头等待
    setTimeout("step02()", 2000);                          // 提示用户抬头看正前方
    setTimeout("step03('/user/checkFace')", 3000);       // 拍照并上传
  })
</script>
</body>
</html>
